Python Machine Learning Case Studies by Danish Haroon
Author: Danish Haroon , Date: November 6, 2017
, Views: 1877
Now that David had defined the method in Listing 3-4, he decided to call it and pass the time series object as a parameter while keeping the window size ‘t’ to 15 (i.e., two weeks). He called the evaluate_stationary method as shown in Listing 3-5.
evaluate_stationarity(data_train['Close_Adj'], 15)
Listing 3-5.Using the Method to Test If Time Series Object Is Stationary
Output
Results of Dickey-Fuller Test:
Test Statistic -1.114302
p-value 0.709335
#Lags Used 0.000000
Number of Observations Used 188.000000
Critical Value (5%) -2.877040
Critical Value (1%) -3.465620
Critical Value (10%) -2.575032
dtype: float64
Copyright Disclaimer:
This site does not store any files on its server. We only index and link
to content provided by other sites. Please contact the content providers
to delete copyright contents if any and email us, we'll remove relevant
links or contents immediately.